<template>
 <div id="vcomments"></div>
</template>

<script>
export default {
 name: 'Valine',
 mounted: function(){
  // require window 
  const Valine = require('valine');
  if (typeof window !== 'undefined') {
   this.window = window
   window.AV = require('leancloud-storage')
   
  }
   
  new Valine({
   el: '#vcomments' ,
   appId: 'VmpBAeTKkWS8hi5iVQdP3lti-gzGzoHsz',
   appKey: 'qAYJO35CzrXdPPMwHYjFM52e',
   placeholder: '欢迎留言',
   enableQQ: true,
   visitor: true,
   meta: ['nick'],
   path: window.location.href
  });
 },
}
</script>